package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author Lenovo
 * @date 2017/12/7
 */
@Entity
@Table(name = "T_SYS_ROLE_NAME_2_RIGHT", schema = "oa", catalog = "")
public class RoleName2RightEntity extends BaseEntity {
    private String roleNameId;
    private String rightId;

    public String getRoleNameId() {
        return roleNameId;
    }

    public void setRoleNameId(String roleNameId) {
        this.roleNameId = roleNameId;
    }

    public String getRightId() {
        return rightId;
    }

    public void setRightId(String rightId) {
        this.rightId = rightId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", id);
        obj.put("ROLE_NAME_ID", roleNameId);
        obj.put("RIGHT_ID", rightId);
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_SYS_ROLE_NAME_2_RIGHT";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("ROLE_NAME_ID", "roleNameId");
        obj.put("RIGHT_ID", "rightId");
        return obj;
    }
}
